using System.Collections.Generic;
using System.Threading.Tasks;
using Comteck.Dto.Orders;
using Comteck.Entities.Orders;

namespace Comteck.Ktt.Services.Orders {
  /// <summary>
  /// 
  /// </summary>
  public interface ISelfOrgService : IScopedDependency {
    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<List<SelfOrgDto>> GetListAsync(SelfOrgQuery model);

    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<SelfOrgDto>> GetAllAsync();

    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<SelfOrgTagRelationDto>> GetAllRelationAsync();

    /// <summary>
    /// 查询分页主表数据
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<IEnumerable<SelfOrgDto>> GetListByIdsAsync(List<int> ids);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<SelfOrgDto> GetEditModelAsync(int id);

    /// <summary>
    /// 新增
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task<AjaxResponse<SelfOrgDto>> SaveAsync(SelfOrgDto model);

    /// <summary>
    /// 批量新增
    /// </summary>
    /// <param name="list"></param>
    /// <returns></returns>
    Task<IEnumerable<SelfOrg>> InsertBatchAsync(IEnumerable<SelfOrg> list);

    /// <summary>
    /// 新增
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    Task DeleteAsync(int id);

    /// <summary>
    /// 
    /// </summary>
    /// <param name="tagId"></param>
    /// <returns></returns>
    Task<bool> IsTagUsedAsync(int tagId);

    /// <summary>
    /// 批量更新
    /// </summary>
    /// <param name="list"></param>
    /// <returns></returns>
    Task SaveBatchAsync(IEnumerable<SelfOrgDto> list);
  }
}
